﻿using System.Linq;
using Medianamik.Core;
using Medianamik.Core.CodeGeneration;
using NUnit.Framework;

namespace Medianamik.Tests.Integration.Medianamik.Core.CodeGeneration
{
    [TestFixture]
    [Ignore]
    public class CodeServiceTest
    {
        [Test]
        public void TestTheMagicForOneType()
        {
            var codeService = new CodeService();
            
            codeService.DoTheMagic(NodeTypeManager.GetNodeType("Client"));


        }

        [Test]
        public void TestTheMagicForAllTypes()
        {
            var types = NodeTypeManager.GetAllTypes(true)
                .Where(t => t.IsGenerated)
                .OrderByDescending(t => t.Depth);

            var codeService = new CodeService();

            types.ForEach(codeService.DoTheMagic);
        }
    }
}